﻿<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/tags/app" prefix="app"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%> 
<HTML>
	<HEAD>
		<TITLE>添加角色组</TITLE>
		<META content="MSHTML 6.00.2800.1276" name=GENERATOR>
		<META http-equiv=Content-Type content="text/html; charset=UTF-8">
		<META http-equiv=Content-Style-Type content=text/css>
		<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
		<script language="javascript"
			src="<app:ContextPath/>/gxjs/style1/pageCommon.js"></script>
		<script language="javascript"
			src="<app:ContextPath/>/gxjs/style1/OaPubptPersonnelSelector.js"></script>
		<script language="javascript"
			src="<app:ContextPath/>/gxjs/style1/general.js"></script>
		<script language="javascript"
			src="<app:ContextPath/>/gxjs/style1/popWin.js"></script>
		<script language="javascript"
			src="<app:ContextPath/>/dwr/interface/GetRoles.js"></script>
		<script language="javascript"
			src="<app:ContextPath/>/dwr/util.js"></script>
		<script language="javascript"
			src="<app:ContextPath/>/dwr/engine.js"></script>
		<LINK href="<app:ContextPath/>/gxcss/style1/mainWin1.css"
			type="text/css" media="screen" rel="stylesheet">
		<LINK href="<app:ContextPath/>/gxcss/style1/mainWin2.css"
			type="text/css" media="screen" rel="stylesheet">
		<script type="text/javascript">
		var target;
		function firstDwr(obj){
			target=obj;
			GetRoles.selectRoleForSelect(callback12);
			
		}
		function callback12(data){
			var json1=eval("("+data+")");
			for (var one in json1) {
				var newoption = document.createElement("OPTION");
				newoption.text = json1[one];   
				newoption.value = one;
				target.add(newoption);
	        }
		}
		//保存新增的用户
function saveUserInfo(data){
    document.getElementById("saveflag").value=data;
    var username=document.getElementById("username").value;
    var password=document.getElementById("password").value;
    var email=document.getElementById("email").value;
    var tel=document.getElementById("tel").value;
    var desc=document.getElementById("desc").value;
    var srpname=document.getElementById("srpname").value;
    var userno=document.getElementById("userno").value;

    //var userename=document.getElementById("userename").value;
    //var userdept=document.getElementById("userdept").value;
    var userstatus=document.getElementById("userstatus").value;
    var usersite=document.getElementById("usersite").value;
    
    
    
    if(userno==null || userno==""){
	  alert("用户编号不能为空");
	  return;
    }
    if(username==null || username==""){
	  alert("用户名称不能为空");
	  return;
    }
    
    else if(password==null || password==""){
	  alert("用户密码不能为空");
	  return;
    }
    
      /* 
    else if(userename==null || userename==""){
	  alert("用户ename不能为空");
	  return;
    }
      else if(userdept==null || userdept==""){
	  alert("部门不能为空");
	  return;
    }
    */
    else if(userstatus==null || userstatus==""){
	  alert("用户状态不能为空");
	  return;
    }
    else if(usersite==null || usersite==""){
	  alert("用户站点不能为空");
	  return;
    }
    else if(email==null || email==""){
	  alert("用户邮件不能为空");
	  return;
    }
    else if(tel==null || tel==""){
	  alert("用户电话不能为空");
	  return;
    }
     else if(desc==null || desc==""){
	  alert("用户备注不能为空");
	  return;
    }
     else if(srpname==null || srpname==""){
	  alert("所属权限不能为空");
	  return;
    }
    if(window.confirm("您确定要添加吗！")){
        alert("添加成功!");
        document.all.actForm.submit(); 
        return true; 
     }else{
        alert("添加失败!");
        return false;
    }
    
}
</script>
	</HEAD>
	<body marginwidth="0" topmargin="0" leftmargin="0" onload="onLoad()" marginheight="0">
	<form method="post" id="actForm" name="actForm" enctype="multipart/form-data" action="insertUser">
		<DIV ID=Title_bar>
			<DIV ID=Title_bar_Head>
				<DIV ID=Title_Head>
					<input id="functionName" type="hidden" name="functionName" /><INPUT TYPE=HIDDEN NAME=checkBox>
				</DIV>
				<DIV ID=Title>
					<img border="0" width="13" height="13" src="<app:ContextPath/>/gximages/style1/title_arrow.gif" />
					用户管理
				</DIV>
				<DIV ID=Title_End>
				</DIV>
				<DIV ID=Title_bar_bg></DIV>
			</DIV>
			<DIV ID=Title_bar_Tail>
				<DIV ID=Title_FuncBar>
					<ul>
						<LI CLASS=line></LI>
						<LI CLASS=title><a name="BTN05860904625JL62" href="/OAapp/WebObjects/OAapp.woa/wo/com.oa8000.proj.oasp12.Oasp1204/xq44RBQlpXo6z8idMVBzBM/10.0.11.0.7.0.0"></a>

    <div onclick="javascript:window.history.go(-1);" class="Btn">
        返回
    </div>

</LI>
						<LI CLASS=line></LI>
						
							<LI CLASS=title><a name="BTN05860904640W738" href="/OAapp/WebObjects/OAapp.woa/wo/com.oa8000.proj.oasp12.Oasp1204/xq44RBQlpXo6z8idMVBzBM/10.0.11.0.9.1.0.0"></a>

    <div onclick="javascript:window.location.href='<app:ContextPath/>/common/sysuser/userAdd.jsp'" class="Btn">
        设置个人信息
    </div>

</LI>
							<LI CLASS=line></LI>
						
							<LI CLASS=title><a name="BTN058609046408CUW" href="javascript:saveUserInfo('saveon');"></a>

    <div onclick="saveUserInfo('saveon');" class="Btn">
        保存并继续
    </div>

</LI>
							<LI CLASS=line></LI>
						
						<LI CLASS=title><a name="BTN058609046403IXH" href="javascript:saveUserInfo('save');"></a>

    <div onclick="saveUserInfo('save');" class="Btn">
        保存
    </div>

</LI>
						<LI CLASS=line></LI>
					</ul>
				</DIV>
			</DIV>
		</DIV>
		<DIV ID=MainArea>
			<div id="PageHead"></div><a name="downloadLnk" href="/OAapp/WebObjects/OAapp.woa/wo/com.oa8000.proj.oasp12.Oasp1204/xq44RBQlpXo6z8idMVBzBM/10.0.11.0.14.1"></a>
			<CENTER>
				<DIV CLASS=ItemBlock_Title1>
					<img border="0" src="<app:ContextPath/>/gximages/style1/title_arrow.gif" />
					用户信息
				</DIV>
				<DIV CLASS=ItemBlockBorder>
					<DIV CLASS=ItemBlock>
						<TABLE CELLPADDING=0 BORDER=0 CELLSPACING=5 WIDTH=50%>
							<TR>
								<TD WIDTH=50></TD>
									<TD WIDTH=70>用户编号</TD>
								<TD>
								    <input type="hidden" name="saveflag" id="saveflag"/>
<%--								    <input onfocus="this.select();" maxlength="40" class="InputStyle" style="width: 120px;" type="text" name="0.11.0.31" />--%>
								    <input maxlength="20" class="InputStyle" style="width:120px" type="text" name="userno" /> 
								</TD>
							</TR>
							
							<TR>
								<TD></TD>
								<TD>用户姓名</TD>
<%--								<TD><input onfocus="this.select();" maxlength="40" class="InputStyle" style="width: 120px;" type="password" name="password" /></TD>--%>
								<TD><input onfocus="this.select();" maxlength="40" class="InputStyle" style="width: 120px;" type="text" name="username" /></TD>
							</TR>
							
<%--							<TR>--%>
<%--								<TD></TD>--%>
<%--								<TD>姓名</TD>--%>
<%--								<TD><input onfocus="this.select();" maxlength="40" class="InputStyle" style="width: 120px;" type="text" name="0.11.0.31" /></TD>--%>
<%--							</TR>--%>
							<TR>
								<TD></TD>
								<TD>密码</TD>
<%--								<TD><input onfocus="this.select();" maxlength="40" class="InputStyle" style="width: 120px;" type="password" name="password" /></TD>--%>
								<TD><input onfocus="this.select();" maxlength="40" class="InputStyle" style="width: 120px;" type="password" name="password" /></TD>
							</TR>
							
							<TR>
								<TD></TD>
								<TD>性别</TD>
								<TD><input type="radio" value="F" name="sex" checked="checked" />男&nbsp;
									<input type="radio" value="M" name="sex" />女</TD>
							</TR>
							
							<!-- start-->
<!--							<TR>-->
<!--								<TD></TD>-->
<!--								<TD>user_ename</TD>-->
<!--								<TD><input onfocus="this.select();" maxlength="50" class="InputStyle" style="width: 120px;" type="text" name="userename" /></TD>-->
<!--							</TR>-->
<!--							<TR>-->
<!--								<TD></TD>-->
<!--								<TD>user_dept</TD>-->
<!--								<TD><input onfocus="this.select();" maxlength="50" class="InputStyle" style="width: 120px;" type="text" name="userdept" /></TD>-->
<!--							</TR>-->
<!--							<TR>-->
<!--								<TD></TD>-->
<!--								<TD>状态</TD>-->
<!--								<TD><input onfocus="this.select();" maxlength="50" class="InputStyle" style="width: 120px;" type="text" name="userstatus" /></TD>-->
<!--							</TR>-->
							
							<TR>
								<TD></TD>
								<TD>状态</TD>
								<TD>
<!--								<select class="SelectStyle" name="srpname" id="srpname">-->
<!--<%--								   <option value="WONoSelectionString">    </option>--%>-->
<!--								     <option>    </option>-->
<!--								 </select>-->
<!--								   <input onfocus="this.select();" maxlength="50" class="InputStyle" style="width: 120px;" type="text" name="userstatus" />-->
								   <select class="SelectStyle" name="userstatus" id="userstatus">
								   	<option value="1">可用</option>
								    <option value="o">不可用</option>
								   </select>
								</TD>
							</TR>
							
							<TR>
								<TD></TD>
								<TD>站点</TD>
								<TD><input onfocus="this.select();" maxlength="50" class="InputStyle" style="width: 120px;" type="text" name="usersite" /></TD>
							</TR>
							<!-- end-->
							
							<TR>
								<TD></TD>
								<TD>邮件</TD>
								<TD><input onfocus="this.select();" maxlength="50" class="InputStyle" style="width: 120px;" type="text" name="email" /></TD>
							</TR>
							
							<TR>
								<TD></TD>
								<TD>电话</TD>
								<TD><input onfocus="this.select();" maxlength="40" class="InputStyle" style="width: 120px;" type="text" name="tel" /></TD>
							</TR>
							
<%--							<TR>--%>
<%--								<TD></TD>--%>
<%--								<TD>创建时间</TD>--%>
<%--								<TD><input onfocus="this.select();" maxlength="40" class="InputStyle" style="width: 120px;" type="text" name="tel" /></TD>--%>
<%--							</TR>--%>
							<TR>
								<TD></TD>
								<TD>备注</TD>
								<TD HEIGHT=50><textarea class="InputAreaStyle" name="desc"></textarea></TD>
							</TR>
						</TABLE>
					</DIV>
				</DIV>
				<DIV CLASS=ItemBlock_Title>
					<img border="0" src="<app:ContextPath/>/gximages/style1/title_arrow.gif" />
					用户权限设置
				</DIV>
				<DIV CLASS=ItemBlockBorder>
						
					<DIV CLASS=ItemBlock>
						<TABLE CELLPADDING=0 BORDER=0 CELLSPACING=5>
							<TR>
								<TD WIDTH=50></TD>
								<TD WIDTH=70 align="left">所属权限组</TD>
								<TD WIDTH=200>
								 <select class="SelectStyle" name="srpname" id="srpname">
<%--								   <option value="WONoSelectionString">    </option>--%>
								     <option>    </option>
								 </select>
								 <script type="text/javascript">
									firstDwr(document.getElementById("srpname"));
								 </script>
								 
								 </TD>
							</TR>
							
						</TABLE>
					</DIV>
				</DIV>
				<DIV ID=InputDetailBar>
					<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=10 ALIGN=center>
						<TR>
							<TD><a name="BTN05860904765OP48" href="javascript:saveUserInfo('save');"></a>

<div onclick="saveUserInfo('save');" class="FuncBtn"><div class=FuncBtnHead></div>
        <div class=FuncBtnMemo>保存</div>
        <div class=FuncBtnTail></div></div></TD>
							<TD><a name="BTN0586090478161FJ" href="javascript:saveUserInfo('saveon');"></a>

<div onclick="saveUserInfo('saveon');" class="FuncBtn"><div class=FuncBtnHead></div>
        <div class=FuncBtnMemo>保存并继续</div>
        <div class=FuncBtnTail></div></div></TD>
							<TD><a name="BTN05860904781SSO5" href="/OAapp/WebObjects/OAapp.woa/wo/com.oa8000.proj.oasp12.Oasp1204/xq44RBQlpXo6z8idMVBzBM/10.0.11.0.192.0.0"></a>

<div onclick="javascript:window.history.go(-1);" class="FuncBtn"><div class=FuncBtnHead></div>
        <div class=FuncBtnMemo>返回</div>
        <div class=FuncBtnTail></div></div></TD>
						</TR>
					</TABLE>
				</DIV>
			</CENTER>
		</DIV>
	<input type="hidden" name="wosid" value="xq44RBQlpXo6z8idMVBzBM" /></form>
	<form method="post" name="homeForm" action="/OAapp/WebObjects/OAapp.woa/wo/com.oa8000.proj.oasp12.Oasp1204/xq44RBQlpXo6z8idMVBzBM/10.0.11.1"><input type="hidden" name="alertMsg" /> <input type="hidden" name="newUrl" /> <input type="hidden" name="newWindow" />
    <input type="hidden" name="confirmMsg" /> <input type="hidden" value="OA8000-试用版平台版--帐号设置" name="topTitle" /><input type="hidden" value="1204" name="pgID" /><input type="hidden" name="returnPage" /><input type="hidden" name="wosid" value="xq44RBQlpXo6z8idMVBzBM" /></form>
    <form method="post" id="menuForm" action="/OAapp/WebObjects/OAapp.woa/wo/com.oa8000.proj.oasp12.Oasp1204/xq44RBQlpXo6z8idMVBzBM/10.0.11.2.1"><script type="text/javascript" language="JavaScript1.2">
writeMenu(false);
</script>
<input type="hidden" name="url" /><input type="hidden" name="urlName" /><input type="hidden" name="wosid" value="xq44RBQlpXo6z8idMVBzBM" /></form>
</body>
	
</HTML>